package com.kycq.viewpager.simple;

import android.databinding.DataBindingUtil;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;

import com.kycq.viewpager.R;
import com.kycq.viewpager.databinding.ActivitySimplePagerBinding;

public class SimplePagerActivity extends AppCompatActivity {
	private ActivitySimplePagerBinding mDataBinding;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		mDataBinding = DataBindingUtil.setContentView(this, R.layout.activity_simple_pager);

		mDataBinding.viewPager.setAdapter(new SimplePagerAdapter(this));
		mDataBinding.tabLayout.setupWithViewPager(mDataBinding.viewPager);
		mDataBinding.viewPager.setCurrentItem(1);
	}
}
